/**
 * Weather.java
 * Jan 9, 2010
 */
package com.dlplay.flightinfo.data;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.Transient;

import com.google.appengine.api.datastore.Key;

/**
 * @author zhang yu
 *
 */
@Entity
public class Weather{
	
	//TODO when DB is needed
	@Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Key key;


	private Date pubTime;
	private Integer temperatureHigh;
	private Integer temperatureLow;
	private Integer temperatureNow;
	private String weather;
	private String wind;
	private String visibility;
	//Professional code
	private String proCode;
	
	
	public Weather() {
	}
	/**
	 * @param info
	 */
	public void copy(Weather info) {
//		this.id = flight.id;
		this.pubTime = info.pubTime;
		this.temperatureHigh = info.temperatureHigh;
		this.temperatureLow = info.temperatureLow;
		this.temperatureNow = info.temperatureNow;
		this.weather = info.weather;
		this.wind = info.wind;
		this.visibility = info.visibility;
		this.proCode = info.proCode;
	}
	
	
	
	public Key getKey() {
        return key;
    }
	
	@Transient
	public void setKey(Key key) {
        this.key = key;
    }
	
	/**
	 * @return the pubTime
	 */
	@Column(name = "pubTime")
	public Date getPubTime() {
		return pubTime;
	}
	/**
	 * @param pubTime the pubTime to set
	 */
	public void setPubTime(Date pubTime) {
		this.pubTime = pubTime;
	}
	
	/**
	 * @return the temperatureHigh
	 */
	@Column(name = "temperatureHigh")
	public Integer getTemperatureHigh() {
		return temperatureHigh;
	}
	/**
	 * @param pubTime the temperatureHigh to set
	 */
	public void setTemperatureHigh(Integer temperatureHigh) {
		this.temperatureHigh = temperatureHigh;
	}
	
	/**
	 * @return the temperatureLow
	 */
	@Column(name = "temperatureLow")
	public Integer getTemperatureLow() {
		return temperatureLow;
	}
	/**
	 * @param pubTime the temperatureLow to set
	 */
	public void setTemperatureLow(Integer temperatureLow) {
		this.temperatureLow = temperatureLow;
	}
	
	/**
	 * @return the temperatureLow
	 */
	@Column(name = "temperatureNow")
	public Integer getTemperatureNow() {
		return temperatureNow;
	}
	/**
	 * @param temperatureNow the temperatureLow to set
	 */
	public void setTemperatureNow(Integer temperatureNow) {
		this.temperatureNow = temperatureNow;
	}
	
	/**
	 * @return the weather
	 */
	@Column(name = "weather")
	public String getWeather() {
		return weather;
	}
	/**
	 * @param pubTime the temperatureHigh to set
	 */
	public void setWeather(String weather) {
		this.weather = weather;
	}
	
	/**
	 * @return the temperatureHigh
	 */
	@Column(name = "wind")
	public String getWind() {
		return wind;
	}
	/**
	 * @param pubTime the temperatureHigh to set
	 */
	public void setWind(String wind) {
		this.wind = wind;
	}
	
	/**
	 * @return the temperatureHigh
	 */
	@Column(name = "visibility")
	public String getVisibility() {
		return visibility;
	}
	/**
	 * @param pubTime the temperatureHigh to set
	 */
	public void setVisibility(String visibility) {
		this.visibility = visibility;
	}
	
	/**
	 * @return the temperatureHigh
	 */
	@Column(name = "proCode")
	public String getProCode() {
		return proCode;
	}
	/**
	 * @param pubTime the temperatureHigh to set
	 */
	public void setProCode(String proCode) {
		this.proCode = proCode;
	}


}
